module.exports = {
  publicPath: '/',
  devServer: {
    port: 8016,
    disableHostCheck: true,
    // open: true, //配置自动启动浏览器
    proxy: {
      '/api': {
        target: 'http://mallrobot-akc-webapi.test.csbilin.com/api', // 对应自己的接口
        changeOrigin: true,
        // ws: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  },
  css: {
    loaderOptions: {
      // postcss 设置
      postcss: {
        plugins: [
          require('autoprefixer')({}),
          require('postcss-pxtorem')({
            rootValue: 100,
            propList: ['*'],
            selectorBlackList: [':root', '#app']
          })
        ]
      },
      scss: {
        additionalData: `@import "@/styles/variables.scss";`
      },
      less: {
        lessOptions: {
          modifyVars: {
            'hack': `true; @import "~@/styles/variables-vant.less";`
          }
        }
      }
    }
  }
}
